package com.zhaiweijia.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zhaiweijia.dao.UserDao;
import com.zhaiweijia.entity.User;
import com.zhaiweijia.service.UserService;
@Service
public class UserServiceImpl implements UserService{

	@Autowired	
	private UserDao  userDao;

	@Override
	public PageInfo list(Integer pageNum, Integer pageSize, User user) {
		//分页
		PageHelper.startPage(pageNum, pageSize);
		List<User> list=userDao.list(user);
		
		PageInfo info = new PageInfo(list);
		
		return info;
	}

	@Override
	public void updateLocked(User user) {
		// TODO Auto-generated method stub
		userDao.updateLocked(user);
	}
	
}
